package com.tjc.spring.core;

import com.tjc.spring.core.resource.ResourceLoader;
import com.tjc.spring.core.resource.XmlBeanDefinitionReader;

public class ClassPathXmlApplicationContext extends DefaultBeanFactory {

    private String configLocation;

    XmlBeanDefinitionReader reader;

    public ClassPathXmlApplicationContext(String configLocation) {
        this.configLocation = configLocation;
        reader = new XmlBeanDefinitionReader(this);
        reader.loadDefinitions(ResourceLoader.getResource("classpath:" + configLocation));
    }
}
